---
type: database
title: Main Database
description: The primary transactional database — orders, buyers and payment attempts; owned by the Payments Service for writes.
tags: [database]
name: main
engine: postgres
timestamp: {{DATE}}
---
<!-- ✂ docujoint template sample — replace with your own content, then delete this comment. -->
# Main Database

## Purpose
Single transactional source of truth. Writes go through
[Payments Service](</Services/Payments Service.md>); apps read through
service APIs, never directly. Tables live under `Data/main/Tables/`,
canonical values under `Data/main/Enums/`.

## Relationships
- [Storefront](</Apps/Storefront/Storefront.md>) reads orders via the service API only.
- [order-placed](</Events/order-placed.md>) events reference rows here by id.

## Open questions
